home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d18
/
turbotut.arc
/
TYPES.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1989-06-30
|
772b
|
28 lines
PROGRAM example_of_types;
TYPE array_def = ARRAY[12..25] OF INTEGER;
char_def = ARRAY[0..27] OF CHAR;
real_array = ARRAY[-17..42] OF REAL;
dog_food = ARRAY[1..6] OF BOOLEAN;
airplane = ARRAY[1..12] OF dog_food;
boat = ARRAY[1..12,1..6] OF BOOLEAN;
VAR index,counter : INTEGER;
stuff : array_def;
stuff2 : array_def;
puppies : airplane;
kitties : boat;
BEGIN (* mian program *)
FOR index := 1 TO 12 DO
FOR counter := 1 TO 6 DO
BEGIN
puppies[index,counter] := TRUE;
kitties[index,counter] := puppies[index,counter];
END;
WRITELN(puppies[2,3]:7,kitties[12,5]:7,puppies[1,1]:7);
END. (* of main program *)